#include<stdio.h>

void Swap(char* x1, char* x2)
{
    char temp = *x1;
    *x1 = *x2;
    *x2 = temp;
}

bool isPalindrome(const char* s) {
    char* str1[200001] = { 0 }, *str2[200001] = { 0 };
    int i = 0;
    for (i = 0; s[i] != '\0'; i++)
    {
        if ((s[i] >= 'A' && s[i] <= 'Z'))
        {
            str1[i] += s[i] + 32;
            str2[i] += s[i] + 32;

        }
        else if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= '0' && s[i] <= '9'))
        {
            str1[i] += s[i];
            str2[i] += s[i];

        }
    }
    /*str1[i] = '\0';
    str2[i] = '\0';
    */printf("i:%d\n", i);
    if (s[0] == ' ')
        return true;
    int left = 0, right = i - 1, n = i;
    while (left < right)
    {
        Swap(str2[left], str2[right]);
        left++;
        right--;
    }
    for (int i = 0; i < n; i++)
    {
        printf("str1[%d]:%c\n", i, str1[i]);
        printf("str2[%d]:%c\n", i, str2[i]);

        if (str1[i] != str2[i])
            return false;
    }
    return true;
}

int main()
{
    const char *s = "A man, a plan, a canal: Panama";
    isPalindrome(s);
    return 0;
}